home *** CD-ROM | disk | FTP | other *** search
- // CellStyleDlg.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "VCDemo.h"
- #include "CellStyleDlg.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CCellStyleDlg dialog
-
-
- CCellStyleDlg::CCellStyleDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CCellStyleDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CCellStyleDlg)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
-
-
- void CCellStyleDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CCellStyleDlg)
- DDX_Control(pDX, IDC_SGCTRL1, m_ctrl);
- //}}AFX_DATA_MAP
- }
-
-
- BEGIN_MESSAGE_MAP(CCellStyleDlg, CDialog)
- //{{AFX_MSG_MAP(CCellStyleDlg)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CCellStyleDlg message handlers
-
- BOOL CCellStyleDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- // TODO: Add extra initialization here
- m_ctrl.DoSetCellString( 0,0, "Align left" );
- m_ctrl.DoSetCellAlignment( 0, 0, 1 );
- m_ctrl.DoSetCellString( 0,1, "Align right" );
- m_ctrl.DoSetCellAlignment( 0, 1, 2 );
- m_ctrl.DoSetCellString( 0,2, "Align medium" );
- m_ctrl.DoSetCellAlignment( 0, 2, 4 );
-
- m_ctrl.DoSetCellString( 0,3, "Align top" );
- m_ctrl.DoSetCellAlignment( 0, 3, 8 );
- m_ctrl.DoSetCellString( 0,4, "Align bottom" );
- m_ctrl.DoSetCellAlignment( 0, 4, 16 );
- m_ctrl.DoSetCellString( 0,5, "Align v_medium" );
- m_ctrl.DoSetCellAlignment( 0, 5, 32 );
-
- m_ctrl.DoSetCellString( 1, 0, "Word break" );
- m_ctrl.DoSetCellTextStyle( 1, 0, 1 );
-
-
- int i,j;
-
- for( i=0; i<6;i++)
- m_ctrl.DoSetRowHeight( i, 50 );
-
- for( i = 1; i<5; i++)
- for( j=3; j<6; j++)
- m_ctrl.DoSetCell3DState(i, j, 1);
- m_ctrl.DoSetCellString( 1, 3, "Form Head" );
-
- for( i = 1; i<5; i++)
- for( j=8; j<12; j++)
- m_ctrl.DoSetCell3DState(i, j, 2);
-
- m_ctrl.SetPageLabelVisible( FALSE );
- COleVariant var( "VCDEMO" );
- m_ctrl.DoSetMessageTitle( var );
-
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
-